OPC > CygNet OPC Servers > Mapping Point State to OPC Quality and Sub-Status

Mapping Point State to OPC Quality and Sub-Status

The CygNet OPC DA and CygNet OPC HDA servers provide a sophisticated method for mapping "point state" to OPC quality and sub-status values. The CygNet CvsMetadata XML file provides default mappings from the defined "point states" and "point state instances" for Point Scheme 0 to the OPC quality and sub-status values as follows.

CygNet Scheme 0 Point State Quality/Sub-status Byte

NORMAL

Hex 0xC0, decimal 192, OPC Quality = "Good"

UNRELIABLE

Hex 0x44, decimal 68, OPC Quality = "Uncertain", Sub-status = "Last Usable Value"

UNINITIALIZED

Hex 0x08, decimal 8, OPC Quality = "Bad", Sub-status = "Not Connected"

Note: When data is retrieved from the OPCHDA server the OPC quality property is also returned, appended with a sub-status of OPCHDA_RAW (if timestamp is exact) or OPCHDA_INTERPOLATED (if timestamp is interpolated).

Additionally, existing custom Point Scheme definitions can be modified to customize the mapping of the user-defined "point states" and "point state instances" to the desired OPC quality and sub-status values. The CygNet OPC Servers load the CVS Metadata XML and resolve the appropriate OPC quality and sub-status values based on highest precedence "point state." See Point State Definitions ext_status.

The CygNet OPC Servers will also set the OPC quality and sub-status values, regardless of resolved point state, based on the following conditions.

OPC Server Quality/Sub-status Byte

Unknown tag

Hex 0x01, decimal 1, OPC Quality = "Bad", Sub-status = "Configuration error"

Unknown point scheme

Hex 0x01, decimal 1, OPC Quality = "Bad", Sub-status = "Configuration error"

Failed to connect to CygNet

Hex 0x18, decimal 24, OPC Quality = "Bad", Sub-status = "Comm. Failure"

CygNet message response error

Hex 0x18, decimal 24, OPC Quality = "Bad", Sub-status = "Comm. Failure"

If the CygNet CVS Metadata XML file fails to load when the CygNet OPC Server starts the following will occur:

OPC Server Quality/Sub-status Byte

Success

Hex 0xC0, decimal 192, OPC Quality = "Good"

Unknown tag

Hex 0x01, decimal 1, OPC Quality = "Bad", Sub-status = "Configuration error"

Failed to connect to CygNet

Hex 0x18, decimal 24, OPC Quality = "Bad", Sub-status = "Comm. Failure"

CygNet message response error

Hex 0x18, decimal 24, OPC Quality = "Bad", Sub-status = "Comm. Failure"

The difference between the new and the old behavior is that on Success the OPC servers will return "Good" instead of mapping the point state to an OPC quality and sub-status value.


Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.